/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #1a1a1a;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.mobile-writing-container {
    width: 100%;
    padding: 10px;
    margin: 0;
    box-sizing: border-box;
    margin-bottom: 50px;
}

.mobile-writing-title {
    text-align: center;
    color: #ffffff;
    margin: 15px 0;
    font-size: 1.5em;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.mobile-input-wrapper {
    position: relative;
}

.mobile-writing-area {
    width: 100%;
    min-height: 70vh;
    padding: 15px;
    font-size: 16px;
    line-height: 1.4;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    resize: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    z-index: 1;
    background: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-text-fill-color: #000;
}

.mobile-writing-area:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

.mobile-loading-spinner {
    display: none;
    position: absolute;
    right: 15px;
    top: 15px;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* iOS optimizations */
@supports (-webkit-touch-callout: none) {
    .mobile-writing-area {
        font-size: 16px;
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* Small screen optimizations */
@media (max-width: 480px) {
    .mobile-writing-title {
        font-size: 1.3em;
        margin: 10px 0;
    }
    
    .mobile-writing-area {
        padding: 12px;
    }
}

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #1a1a1a;  /* 匹配body背景色 */
    text-align: center;
    padding: 10px 0;
    font-size: 12px;
    color: #888;
    border-top: 1px solid #333;  /* 深色主题的边框 */
}

/* 小屏幕适配 */
@media (max-width: 480px) {
    .site-footer {
        font-size: 11px;
        padding: 8px 0;
    }
}

.logo-container {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 100;
}

.logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.mobile-writing-area mark {
    background-color: #f40c0c;
    color: inherit;
    padding: 0;
}

.completion-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 15px;
    font-size: 16px;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    pointer-events: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #000;
}

.completion-overlay .completed-text {
    color: #666;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 2px;
}

/* iOS optimizations for overlay */
@supports (-webkit-touch-callout: none) {
    .completion-overlay {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* Small screen optimizations for overlay */
@media (max-width: 480px) {
    .completion-overlay {
        padding: 12px;
    }
}
